<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title>js测试</title>
</head>
<body>
<h1 id="h1_id">标题</h1>
<a id="a_id" href="https://live.v.wo.cn/platform/ytpxz/index.html?cid=xdx">链接文本</a>
<img id="img_id" src=" http://www.runoob.com/images/pulpit.jpg" alt="图片"/>
<ul>
    <li id="li_id1">Coffee</li>
    <li id="li_id2">Milk</li>
</ul>
<form>
    First name:
    <input type="text" name="firstname" id="input_id1"/>
    <br/> Last name:
    <input type="text" name="lastname" id="input_id2"/>
</form>
<form>
    <input type="radio" name="sex" value="male" id="radio_id1"/>Male
    <br/>
    <input type="radio" name="sex" value="female" id="radio_id2"/>Female
</form>
<form>
    <input type="checkbox" name="vehicle" value="Bike" id="checkbox_id1"/>Bike
    <br/>
    <input type="checkbox" name="vehicle" value="train" id="checkbox_id2"/>train
    <br/>
    <input type="checkbox" name="vehicle" value="Car" id="checkbox_id3"/>Car
</form>
<form>
    <input type="button" id="btn_id" onclick="test(3,2)" value="点击"/>
</form>
<script type="text/javascript">
<!--测试方法调用-->
   function test(a, b) {
    alert( "a*b="+a * b);
   }
<!--测试输入框-->
  function setInputContent(id,content){
     document.getElementById(id).value=content;
    }
<!--获取Radio的选中内容-->
  function getRadioChecked(name){
    var radios = document.getElementsByName(name);
    for (var i = 0; i < radios.length; i++) {
     if (radios[i].checked==true) {
        window.java_obj.getRadionChecked(name,radios[i].value);
     }
     }
    }
<!--获取CheckBox的选中内容-->
  function getCheckBoxChecked(name){
   var checked_value=[];
   var checkbox = document.getElementsByName(name);
   for(var i=0;i<checkbox.length;i++){
   if(checkbox[i].checked){
   checked_value.push(checkbox[i].value)
   }
   }
   return window.java_obj.getCheckBoxChecked(checked_value);
  }

</script>
</body>
</html>